<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * 后台页面显示类
 * @author wwj
 *
 */
class Main extends MY_Controller
{
	function __construct()
	{
		parent::__construct();
		$this->check_login();
		$this->load->language('menu');
	}
	
	function index()
	{
		$data = array('title' => $this->lang->line('menu_title_index'));
		$this->load->view('admin_main', $data);
	}
	function top()
	{
		$this->load->model('manager_m');
		$admin = $this->manager_m->get_manager(array('id' => $this->session->userdata('uid')));
		if (empty($admin))
		{
			$this->logout();
			return TRUE;
		}
		$admin['title'] = $this->lang->line('menu_title_index');
		$admin['header'] = $this->header;
		$this->load->view('admin_top', $admin);
	}
	function left()
	{
		$this->load->view('admin_left');
	}
	function right()
	{
		$data = array('title' => $this->lang->line('menu_title_index'), 'header' => $this->header);
		$this->load->view('main', $data);
	}
}
/* End of file main.php */
/* Location: ./application/controllers/main.php */